

package xib;

import xib.android.HandlerAndroid;
import xib.android.IHandlerAndroid;
import xib.desktop.HandlerDesktop;
import xib.desktop.IHandlerDesktop;

/**
 *
 * @author xavierds
 */
public final class XibFactory {

    private static XibFactory instance = new XibFactory();

    /**
     * Constructor by default for the factory
     */
    private XibFactory(){}

    /**
     * Obtain the instance of the XibFactory.
     * @return
     */
    public synchronized static XibFactory getInstance(){
        return instance;
    }

    /**
     * Obtain a Handler for the android OS.
     * @return
     */
    public IHandlerAndroid getIHandlerAndroid(){
        return new HandlerAndroid();
    }

    /**
     * Obtain a Handler for a desktop application.
     * @return
     */
    public IHandlerDesktop getIHandlerDesktop(){
        return new HandlerDesktop();
    }
}

